package two;

import java.util.Scanner;

public class test17082 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int m =scanner.nextInt();
        int n=scanner.nextInt();
        int k =scanner.nextInt();
        int[] a= new int[m];
        int[] b=new int[n];
        for (int i = 0; i < m; i++) {
            a[i]=scanner.nextInt();
        }
        for (int i = 0; i < n; i++) {
            b[i]=scanner.nextInt();
        }
        System.out.println(findK(a, b, 0, m - 1, 0, n - 1, k));
    }

    private static int findK(int[] a, int[] b, int aBeg, int aEnd, int bBeg, int bEnd, int k) {
        if(aBeg>aEnd) return b[bBeg+k-1];
        if(bBeg>bEnd) return a[aBeg+k-1];
        int aMid = aBeg+(aEnd-aBeg)/2;
        int bMid = bBeg+(bEnd-bBeg)/2;
        int halfLen =aMid+bMid-aBeg-bBeg+2;
        if(a[aMid]<b[bMid]){
            if(k<halfLen){
                return findK(a,b,aBeg,aEnd,bBeg,bMid-1,k);
            }else {
                return findK(a,b,aMid+1,aEnd,bBeg,bEnd,k-aMid+aBeg-1);
            }
        }else {
            if(k<halfLen){
                return  findK(a,b,aBeg,aMid-1,bBeg,bEnd,k);
            }else{
                return  findK(a,b,aBeg,aEnd,bMid+1,bEnd,k-bMid+bBeg-1);
            }
        }
    }
}
